<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<!-- 	<input type="button" value="小图" id="btn">
	<img src="../image/1-small.jpg" alt="" id="img"> -->
	<a href="../image/1.jpg" id="toggle">
		<img src="../image/1-small.jpg" alt="" id="img">
		<img src="" alt="" id="big">

	</a>
</body>

<script>

	var toggle = document.getElementById('toggle')
	var img = document.getElementById('img')
	var big = document.getElementById('big')
	// var btn = document.getElementById('btn');
	// btn.onclick = function(){
	// 	if(this.value =="小图"){
	// 		this.value = "大图"
	// 		img.src = "../image/1.jpg"

	// 	}else{
	// 		this.value = "小图"
	// 		img.src = "../image/1-small.jpg"
	// 	}
	// }
	// 
	// toggle.onclick = function(){
	// 	big.src=this.href
	// 	return false

	// }
	// 
	toggle.onclick = function(){
		big.src = this.href
		return false
	}

	
</script>
</html>